home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / make / icmake-6.000 / icmake-6 / icmake / exec / fungreq.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-08  |  636 b   |  32 lines

  1. /*
  2. \funcref{fun\_greq}{void fun\_greq ()}
  3.     {}
  4.     {}
  5.     {push(), compare(), pop()}
  6.     {}
  7.     {fungreq.c}
  8.     {
  9.         Function {\em fun\_greq()} is called when opcode {\em op\_greq} is read.
  10.         This function pops two variables, calls {\em compare()} to compare the
  11.         values, and pushes the result of the comparison. The two compared
  12.         variables are discarded.
  13.     }
  14. */
  15.  
  16. #include "icm-exec.h"
  17.  
  18. void fun_greq ()
  19. {
  20.     VAR_
  21.         lval,
  22.         rval;
  23.  
  24.     rval = pop ();
  25.     lval = pop ();
  26.     compare (lval, rval);
  27.     stack [sp].vu.intval = (stack [sp].vu.intval >= 0);
  28.  
  29.     discard (lval);
  30.     discard (rval);
  31. }
  32.